<%@ page language="java" contentType="text/html; charset=windows-1256"
    pageEncoding="windows-1256"%>
    <%@page import="com.ibm.eg.cvmanager.dto.*"%>
<%@page import="com.ibm.eg.cvmanager.business.stub.*"%>
<%@page import="com.ibm.eg.cvmanager.business.interfaces.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
<title>Insert title here</title>
</head>
<body>
<%
	String id=request.getParameter("id");
    Applicant app=new Applicant ();
   
	if(id !=null){
	ApplicantBusiness business = new ApplicantBusinessImpl();
	 app=business.getApplicant(Integer.parseInt(id));
	}
	
	
	
%>
<form method="post" action="/CVManagerWeb/AddApplicant" ENCTYPE="multipart/form-data">
<table  align="center">
<tr>
<td>
<p>Name</p>
</td>
<td>
<input type="text"  name="name" size="25" value="<%=id == null ? "" : app.getName()%>">
</td>
</tr>
<tr>
<td>
<p>phone</p>
</td>
<td>
<input type="text" name="phone" size="25" value ="<%=id == null ? "" : app.getPhone()%>">
</td>
</tr>
<tr>
<td>
<p>email</p>
</td>
<td>
<input type="text"  name ="email" size="25" value ="<%=id == null ? "" : app.getEmail()%>">
</td>
</tr>
<tr>

<td>
<p>mobile</p>
</td>
<td>
<input type="text" name ="mobile" size="25" value ="<%=id == null ? "" : app.getMobile()%>">
</td>
</tr>
<tr>

<td>
<p>Enter the CV</p>
</td>
<td>
<input type="file" name="cv" size="chars"> 

</td>
</tr>
<tr>
<td>
	<input type="submit" name = "addapplicant" value="<%=id == null ? "ADD" : "UPDATE"%>">
</td>
</tr>

</table>
</form>

</body>
</html>